Copyright: Copyright ® 1996 Greg Postlewait


Gpclip Unit

gpClipboard Component
Version 1.0 Built 7/31/96
Copyright (c) 1996 Greg Postlewait

Installation

Registration

Contacting the Author

The following items are declared in the Gpclip unit:

Components

TgpClipboard

Types

TgpClipboardEvent

Thank you for your interest in the gpClipboard component.  This is the first in a series of components that will provide your applications with the rich, standard features found in Windows applications.  Future components that are currently under development and testing  are:

-   Exception Handling and logging
-   Text undo stack
-   Keyboard mapping for tab control and database commands
-   MDI utilities for window management and form placement
-   Login Dialog
-   Full Featured application security system

Finally, we will roll together all of these components into a standardized framework with including template forms, all of our custom components installed, all ready to go.

You are using the SHAREWARE version of gpClipboard.  You may install and use this software for 30 days to decide if it meets your needs.  After the 30 day trial period, you must register the software or remove all copies of it from your possession.  Registered users receive technical support, updates, and notices about new software releases.


TgpClipboard Component

Properties	Methods	Events

Unit

Gpclip

Description

The gpClipboard Component is designed to provide global text clipboard support to an application with a minimal amount of code.  Typically, the component is placed on the application's main form where it can be easily tied to your edit menu and/or speedbar.  Once the methods are set up with your menu, most editable text components on all your forms are clipboard enabled!

The Copy, Cut, Paste, and Undo methods are tied directly into a menu,  speed button, or other control.  For the global clipboard support to work properly, it is important to note that these methods must be called from all your forms.  This is easily accomplished in a MDI application menu.  In SDI applications, if the forms and menus of your application do not communicate with one another, you will need to place a gpClipboard component on every form.

Use the UndoMenuItem property to link directly to the menu item you have assigned to undo the last clipboard command (if possible).  It will become disabled automatically when there is nothing to undo, or Windows has reported that the last clipboard action cannot be undone.  The ShowHourglass property, when set to true, will briefly show an hourglass during clipboard operations.

As of this release, the following list are the classes of components that may receive clipboard support from the gpClipboard component.  Other custom component that is based off of one of these classes have been known to work as well.

-   TEdit
-   TMemo
-   TMaskEdit
-   TDBEdit
-   TDBMemo
-   TComboBox
-   TDBComboBox
-   TStringGrid
-   TDBGrid

Please note that not all custom components based off of these classes will be compatable with the gpClipboard component.  If you come across such a component, please notify the author.


16 Bit Installation

After UNZIPing the source file into a destination directory of your choice, you must install the component in the Delphi component library.

1.   Run Delphi and close all projects.
2.   Select Options | Install Components from the menu.
3.   Click the Add button.
4.   Type the path the you installed the components into, or press the Browse button to select the path.
5.   Select the file gpclip.dcu.
6.   Click the OK button, and Delphi will recompile your component library.  Your new component will appear on the gpFramework pallette page.


Properties

CanUndo	ShowHourglass	UndoMenuItem


CanUndo Property

See Also

Applies To

TgpClipboard

Declaration

property CanUndo : Boolean;

Description

The CanUndo property is an internal, read-only flag you may reference to determine if the last clipboard can be undone.  This flag is set by Windows if it determines that it is capable of undoing the last clipboard action.


Installation

This package contains both the 16 and 32 bit versions of gpClipboard.  The 16 bit (Windows 3.1) version of gpClipboard is contained in the file:
  GPCLIP16.ZIP
Likewise, the 32 bit (Windows 95/NT) version is contained in the file:
  GPCLIP32.ZIP

16 Bit Installation

32 Bit installation

Help file Installation

1.   Copy the files gpclip.hlp to your delphidirectory (or where your Delphi .hlp files are located) , and gpclip.kwf to your delphidirectory (or where your Delphi .kwf files are located).
2.   Close Delphi.
3.   Run the Help Installation utility (HELPINST.EXE) from your delphidirectory.
4.   Select Open, then DELPHI.HDX.
5.   Click the Add a new keyword file and add the file gpclip.kwf.
6.   Select File | Save to recompile the new help file.

You are now ready to use the gpClipboard ComponentTgpClipboard.


ShowHourglass Property

Applies To

TgpClipboard

Declaration

property ShowHourglass : boolean;

Description

Set the ShowHourglass property to true if you want the standard windows Hourglass (crHourglass) to be displayed during a copy, cut, paste, or undo.


Registration

You are using the SHAREWARE version of gpClipboard.  You may install and use this software for 30 days to decide if it meets your needs.  After the 30 day trial period, you must register the software or remove all copies of it from your possession.  Registered users receive technical support, updates, and notices about new software releases.

Registering by credit card, check, or money order

Registering on CompuServe

Pricing:

Single developer license..............................................	$25.00

All registered users will receive the current release of gpClipboard, source code, on-line help files, email technical support, and notification of future product releases and updates.

The registered version of this product will be sent via electronic mail unless otherwise requested.  If you prefer to have a disk mailed to your organization, there is an additional $5.00 shipping and handling charge.

Registered users may distribute gpClipboard as part of their compiled (.EXE or .DLL) application royalty free, as long as internal copyright notices are not modified.

Site licensing and multiuser discounts are available.  Please email me for details.  Include your company name, and number of licenses requested when contacting me.

Warranty:

No warranties expressed or implied.  Use at your own risk.  In no case shall author's liability exceed the registration fee paid.  This agreement governed by the laws of the State of Oregon, United States of America.

Technical Support

All support will be provided through electronic mail or in CompuServe's Delphi forum (GO DELPHI).  No telephone support is offered at this time.  All problems will be addressed as soon as possible.

Contacting the Author


UndoMenuItem Property

See Also

Applies To

TgpClipboard

Declaration

property UndoMenuItem : TMenuItem;

Description

The Object Inspector will display a list of all TMenuItems on the form.  Select the one that will be tied into the Undo method.  When clipboard actions are performed, the Undo menu item will be enabled or disabled automatically according to the CanUndo flag.


TgpClipboard Properties CanUndo See also
See Also

Undo

UndoMenuItem


Methods

Clear	Cut	Undo

Copy	Paste


Clear Method

See Also	Example

Applies To

TgpClipboard

Declaration

procedure Clear;

Description

Clears the current contents of the clipboard.


TgpClipboard Properties UndoMenuItem See also
See Also

Undo

CanUndo


Copy Method

See Also	Example

Applies To

TgpClipboard

Declaration

procedure Copy;

Description

Makes a copy of the selected text in a edit control and places it in the clipboard.


Cut Method

See Also	Example

Applies To

TgpClipboard

Declaration

procedure Cut;

Description

Removes selected text from the edit control and places it in the clipboard.


TgpClipboard Methods Clear See also
See Also

Copy

Cut

Paste

Undo


TgpClipboard Methods Copy See also
See Also

Clear

Cut

Paste

Undo


Paste Method

See Also	Example

Applies To

TgpClipboard

Declaration

procedure Paste;

Description

Takes the text contents of the clipboard and places it in the edit control.  If any portion of the text is selected in the edit control, it is replaced with the clipboard contents.


Undo Method

See Also	Example

Applies To

TgpClipboard

Declaration

procedure Undo;

Description

Restores text to it's original content by reversing the last clipboard action.  This may be accomplished only when the CanUndo property is set to true, indicating that Windows is capable of undoing the last clipboard action.


Events

OnCopy	OnPaste	OnCut

OnUndo


OnCopy Event

See Also	Example

Applies To

TgpClipboard

Declaration

property OnCopy : TgpClipboardEvent;

Description

Allows custom actions to occur before the selected text is copied to the clipboard.  To prevent the component from performing it's Copy function, set the AllowAction property of the gpClipboardEvent to false.


OnCut Event

See Also	Example

Applies To

TgpClipboard

Declaration

property OnCut : TgpClipboardEvent;

Description

Allows custom actions to occur before the selected text is removed from the edit control and placed in the clipboard.  To prevent the component from performing it's Cut function, set the AllowAction property of the TgpClipboardEvent to false.


OnPaste Event

See Also	Example

Applies To

TgpClipboard

Declaration

property OnPaste : TgpClipboardEvent;

Description

Allows custom actions to occur before clipboard text is placed in the edit control (and over writing any selected text).  To prevent the component from performing it's Paste function, set the AllowAction property of the TgpClipboardEvent to false.


OnUndo Event

See Also	Example

Applies To

TgpClipboard

Declaration

property OnUndo : TgpClipboardEvent;

Description

Allows custom actions to occur before the last clipboard action is reversed.  This event will be called regardless of the CanUndo flag.  To prevent the component from performing it's Undo function, set the AllowAction property of the TgpClipboardEvent to false.


TgpClipboard Methods Cut See also
See Also

Clear

Copy

Paste

Undo


TgpClipboard Methods Paste See also
See Also

Clear

Copy

Cut

Undo


TgpClipboard Methods Undo See also
See Also

UndoMenuItem

CanUndo

Clear

Copy

Cut

Paste


TgpClipboard Events OnCopy See also
See Also

OnCut

OnPaste

OnUndo


TgpClipboard Events OnCut See also
See Also

OnCopy

OnPaste

OnUndo


TgpClipboard Events OnPaste See also
See Also

OnCopy

OnCut

OnUndo


TgpClipboardEvent Type

Unit

Gpclip

Declaration

TgpClipboardEvent = procedure( Sender: TObject; var AllowAction : boolean ) of object;

Description

The event is triggered on any Cut, Copy, or Paste action and allows custom actions to occur before the intended action.  To prevent the component from performing it's intended function, set the AllowAction property of the TgpClipboardEvent to false.


TgpClipboard Events OnUndo See also
See Also

OnCopy

OnCut

OnPaste


TgpClipboard Methods Clear Example
Example:

procedure TForm1.EditMenuClear;
begin
  gpClipboard.Clear;
end;


TgpClipboard Methods Copy Example
Example:

procedure TForm1.EditMenuCopy;
begin
  gpClipboard.Copy;
end;


TgpClipboard Methods Cut Example
Example:

procedure TForm1.EditMenuCut;
begin
  gpClipboard.Cut;
end;


TgpClipboard Methods Paste Example
Example:

procedure TForm1.EditMenuPaste;
begin
  gpClipboard.Paste;
end;


TgpClipboard Methods Undo Example
Example:

procedure TForm1.EditMenuUndo;
begin
  gpClipboard.Undo;
end;


TgpClipboard Events OnCopy Example
Example:

procedure TForm1.gpClipboardOnCopy(Sender: TObject; var AllowAction: Boolean);
begin
   your custom copy code goes here

   if you want to disable the default copy action of the component
  AllowAction := False;
end;


TgpClipboard Events OnCut Example
Example:

procedure TForm1.gpClipboardOnCut(Sender: TObject; var AllowAction: Boolean);
begin
   your custom cut code goes here

   if you want to disable the default cut action of the component
  AllowAction := False;
end;


TgpClipboard Events OnPaste Example
Example:

procedure TForm1.gpClipboardOnPaste(Sender: TObject; var AllowAction: Boolean);
begin
   your custom paste code goes here

   if you want to disable the default paste action of the component
  AllowAction := False;
end;


TgpClipboard Events OnUndo Example
Example:

procedure TForm1.gpClipboardOnUndo(Sender: TObject; var AllowAction: Boolean);
begin
   your custom undo code goes here

   if you want to disable the default undo action of the component
  AllowAction := False;
end;


North_Star_Registration
Credit Card, Check, and Money Order Registration

For your convenience we have contracted another company, NorthStar Solutions, to process any orders you may wish to place with your Visa, MasterCard, or Discover Card.  NorthStar Solutions can be easily contacted for orders only via any of the following methods:

PHONED ORDERS:
Calls are taken 10 am - 8 pm, EST, Monday thru Saturday.
1-800-699-6395  (Calls from the U.S. Only)
1-803-699-6395

FAXED ORDERS:
1-803-699-5465  (Available 24 hours.  International and business orders encouraged.)

E-MAILED ORDERS:
America Online: STARMAIL
CompuServe: 71561,2751
Internet:  71561.2751@compuserve.com

MAILED ORDERS:
You may register with a check or money order (U.S. currency).
Make them payable to "NorthStar Solutions" and send them to:
PO Box 25262
Columbia, SC  29224

Please provide (or be prepared to provide) the following information when ordering:
* The program you are registering ("gpClipboard Component for Delphi")
* Your mailing address
* Your Visa, MasterCard, or Discover # and its expiration date (if using credit card).
* Your E-Mail address.  Orders are filled by the author via electronic mail.  If you cannot provide a E-Mail address, there is an additional charge of $5.00 shipping and handling.

IMPORTANT:
* NorthStar processes registrations only.  Please contact the author for any product/technical support.
* E-Mailed and faxed registrations are encourages, but all registrations are very much appreciated.

Contacting the Author


New Topic
Registering on CompuServe

Registration via CompuServe's Shareware Registration service is fast and easy.  The Registered version of the gpClipboard Component will be sent via electronic mail usually within 24 hours.

GO SWREG and enter registration number 12392.  A fee of $25.00 will be added to your CompuServe account.


32 Bit Installation

After UNZIPing the source file into a destination directory of your choice, you must install the component in the Delphi component library.

1.   Run Delphi32 and close all projects.
2.   Select Components | Install from the menu.
3.   Click the Add button.
4.   Type the path the you installed the components into, or press the Browse button to select the path.
5.   Select the file gpclip.dcu.
6.   Click the OK button, and Delphi will recompile your component library.  Your new component will appear on the gpFramework pallette page.


New Topic
Contacting the Author

For technical support, questions, comments, and information about multi-user licensing, please email to:

GREG POSTLEWAIT

gpost@teleport.com

or

via CompuServe: 71163,1524